package com.sumainfor.wx.system.maket.controller;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.wx.system.feign.BaseFeignTenant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * <p>
 * 房源详情
 * <p>
 *
 * @author: zc
 * @create: 2019-08-22 13:55
 **/
@Controller
@RequestMapping("/housing")
public class HousingFindController {

    @Autowired
    BaseFeignTenant baseFeignTenant;


    /**
     * 根据房源详表编号查询房源详情
     * @author zhoucong
     * @data 2019/8/22
     * @Param
     * @return
     */
    @ResponseBody
    @RequestMapping("/getHousingInfoById")
    public JsonResult getHousingInfoById(@RequestParam("infoId") String infoId){
    return baseFeignTenant.getHousingInfoById(infoId);
}


    /**
     * 根据房源详表编号和租客的编号查询房源是否是喜爱房源
     * @author zhoucong
     * @data 2019/8/22
     * @Param
     * @return
     */
    @ResponseBody
    @GetMapping("/selectLikeHousing")
public JsonResult selectLikeHousing(@RequestParam Map<String, Object> params) {
    return baseFeignTenant.selectLikeHousing(params);
}
}
